package com.ddtech.business.course.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ddtech.business.course.entity.CourseStudyRecordDetails;
import com.ddtech.business.course.query.CourseStudyRecordDetailsQuery;
import com.ddtech.business.course.vo.res.CourseLearnHistoryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @version v1.0
 * @ClassName:CourseStudyRecordDetailsMapper description：
 * @author:wei_zhang(xiao)
 * @date: 2023-06-08 13:38
 */
@Mapper
public interface CourseStudyRecordDetailsMapper extends BaseMapper<CourseStudyRecordDetails> {

    CourseStudyRecordDetails personInfo(@Param("courseStudyRecordDetailsQuery") CourseStudyRecordDetailsQuery courseStudyRecordDetailsQuery);

    IPage<CourseLearnHistoryVo> personStudyHistory(IPage page, @Param("courseStudyRecordDetailsQuery") CourseStudyRecordDetailsQuery courseStudyRecordDetailsQuery);

    Map<String,Object> personCourseStudyPercent( @Param("courseStudyRecordDetailsQuery") CourseStudyRecordDetailsQuery courseStudyRecordDetailsQuery);

    Map<String,Object> personTrainStudyPercent( @Param("courseStudyRecordDetailsQuery") CourseStudyRecordDetailsQuery courseStudyRecordDetailsQuery);

    Map<String,Object> courseStusyStatisticApp( String userId);

    List<Map<String,Object>> studyStatisticIndexTime();

    List<Map<String,Object>>  studyStatisticIndexPerson();

    List<Map<String,Object>>  studyStatisticTop10();

    List<Map<String,Object>>  courseTypeStatistic();

    Map<String,Object> todayStudyInfo(String toDay,String yesterday);
}
